$(function(){
	//alert("cool");
	var eventId = $('#eventId').text();
	$('#selOk').click(changeViceCommender);
	
	function changeViceCommender(){
		var UId = $('#selDepts option:selected').attr('value');
		//alert(UId);
		//alert(eventId);
		var timestamp = Date.parse(new Date());
		var url = "/ag/zrt/changViceCommender.action?ts="+timestamp;
		var data = {eventId:eventId,UId:UId};
		$.post(url,data,function(data){
			alert("更改成功,点击确定后将退出到首页");
			//parent.window.frames['showDetail'].location.reload();
			$('#exit').trigger("click");
		});
	}
});